<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/basePath.jsp"%>
<%@ include file="/classes/CommonHelper.class.jsp" %>
<%@ include file="/classes/DBHelper.class.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String sql = "select * from APP_ZSPJ_TYPE order by order_num";
	List<Map<String,Object>> list = queryForList(sql);
	pageContext.setAttribute("list",list);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="../js/jquery.form.js"></script>
<script type="text/javascript">
function del(id){
	if(confirm("确定要删除？")){
		location.href = 'zspj_type_del.jsp?guid='+id+'&r=<%=new Date().getTime() %>';
	}
}
</script>
<link rel="stylesheet" type="text/css" href="../css/mytable.css"></link>
</head>
<body>
<form id="myForm" action="zspj_type_modifydo.class.jsp?r=<%=new Date().getTime()%>" method="post" >
	<input type="button" onclick="location.href = 'zspj_type_add.jsp?r=<%=new Date().getTime() %>'" value="新增" />
	<input type="button" onclick="location.href = 'zspj_list.jsp?r=<%=new Date().getTime() %>'" value="内容管理" />
	<table id="mytable" cellspacing="0" >
		<tr>
			<th scope="col" width="200">类型名称</th>
			<th scope="col" width="100">排序 </th>
			<th scope="col" width="100">操作</th>
		</tr>
		<c:forEach items="${list }" var="type">
		<tr>
			<td scope="row">${type.type_name }</td>
			<td scope="row">${type.order_num }</td>
			<td scope="row" align="center">
			[<a href="zspj_type_modify.jsp?guid=${type.guid}&r=<%=new Date().getTime() %>">修改</a>]
			[<a href="javascript:del('${type.guid }')">删除</a>]</td>
		</tr>
		</c:forEach>
	</table>
</form>
</body>
</html>